home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1988 July / 1988-07.d64 / mixed modes (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  1KB  |  35 lines

  1. 10 rem mixed modes - copyright 1988 compute! publications, inc.
  2. 20 rem registers 17,24,32,33
  3. 30 v=49152:s=49664:o=s+82:i=s+161:df=s+209
  4. 40 forx=820to850:readd:pokex,d:next
  5. 50 print"[147]":pokes+1,2:sysi
  6. 60 pokev+18*8,114:pokev+18*8+1,186
  7. 70 pokev+32*8,1:pokev+33*8,0:pokev+32*8+1,1:pokev+33*8+1,0
  8. 80 pokev+17*8,59:pokev+17*8+1,27
  9. 90 pokev+24*8,29:pokev+24*8+1,21
  10. 100 b=8192:e=16192:n=0:gosub280
  11. 110 b=1024:e=1304:n=48:gosub280
  12. 120 b=1304:e=1744:n=32:gosub280
  13. 130 b=1744:e=2024:n=112:gosub280
  14. 140 syss
  15. 150 print"[159]                  sine                  "
  16. 160 printspc(12)"[154]high-res and text"
  17. 170 printspc(7)"(or other graphics modes)"
  18. 180 print"    can be mixed on the same screen."
  19. 190 print"[158]                 cosine                 "
  20. 200 forx=100to219
  21. 210 y1=int(35+10*sin(x/10)):y2=int(170+10*cos(x/10))
  22. 220 b1=8192+int(y1/8)*320+int(x/8)*8+(y1and7)
  23. 230 b2=8192+int(y2/8)*320+int(x/8)*8+(y2and7)
  24. 240 bi=7-(xand7)
  25. 250 pokeb1,peek(b1)or(2^bi):pokeb2,peek(b2)or(2^bi)
  26. 260 nextx
  27. 270 goto270
  28. 280 bh=int(b/256):bl=b-bh*256:poke823,bl:poke824,bh
  29. 290 eh=int(e/256):el=e-eh*256:poke840,el:poke847,eh
  30. 300 poke821,n:sys820:return
  31. 310 data169,0,141,255,255,238,55,3
  32. 320 data173,55,3,208,3,238,56,3
  33. 330 data173,55,3,201,0,208,233,173
  34. 340 data56,3,201,0,208,226,96
  35.